﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site2.Master" AutoEventWireup="true"
    CodeBehind="PropertyDetails.aspx.cs" Inherits="LenderClearingHouse.PropertyDetails"
    EnableEventValidation="false" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphPageHeader" runat="server">
    Property Details
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="cphMain" runat="server">
    <h2>
        <asp:Label ID="lbAddress" runat="server" Text=""></asp:Label>
    </h2>
    <p>
        <asp:Label ID="lbDetails" runat="server" Text=""></asp:Label></p>
    <div style="position: relative; width: 100%">
        <table height="332" width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td width="543">
                    <!-- "previous page" action -->
                    <div style="position: absolute; top: 120px; left: 20px; z-index: 1000">
                        <a class="prev browse left"></a>
                    </div>
                    <!-- root element for scrollable -->
                    <div class="scrollable">
                        <!-- root element for the items -->
                        <div class="items">
                            <asp:PlaceHolder ID="phItems" runat="server"></asp:PlaceHolder>
                        </div>
                    </div>
                    <!-- "next page" action -->
                    <div style="position: absolute; top: 120px; left: 480px; z-index: 1000">
                        <a class="next browse right"></a>
                    </div>
                    <br clear="all" />
                </td>
                <td width="100%" align="center" valign="top">
                    <asp:DataList ID="dlDocuments" runat="server" RepeatColumns="2" Width="100%" OnItemDataBound="dlDocuments_ItemDataBound"
                        OnItemCommand="dlDocuments_ItemCommand">
                        <ItemTemplate>
                            <div style="padding: 10px;">
                                <table cellpadding="0" cellspacing="0" border="0">
                                    <tr>
                                        <td valign="middle" style="padding-left: 10px">
                                            <asp:ImageButton ID="btnDeleteDocument" runat="server" CommandName="DeleteDocument"
                                                ImageUrl="~/images/Cancel.gif" OnClientClick="return confirm('Delete this document?');" />
                                        </td>
                                        <td style="padding-left: 10px" valign="top" width="100%">
                                            <asp:HyperLink ID="hlLink" runat="server" />
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </ItemTemplate>
                    </asp:DataList>
                    <asp:DataList ID="dlImages" runat="server" RepeatColumns="4" 
                        onitemdatabound="dlImages_ItemDataBound" 
                        onitemcommand="dlImages_ItemCommand" >
                        <ItemTemplate>
                            <div style="padding: 10px;">
                                <table cellpadding="0" cellspacing="0" border="0">
                                    <tr>
                                        <td valign="middle" style="padding-left: 10px">
                                            <asp:ImageButton ID="btnDeleteImage" runat="server" CommandName="DeleteImage"
                                                ImageUrl="~/images/Cancel.gif" OnClientClick="return confirm('Delete this image?');" />
                                        </td>
                                        <td style="padding-left: 10px" valign="top" width="100%">
                                            <asp:Image ID="imgImage" runat="server" Width="100" Height="100" />
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </ItemTemplate>
                    </asp:DataList>
                </td>
            </tr>
        </table>
    </div>
    <br />
    <asp:Panel ID="panelUpload" runat="server" GroupingText="Upload documents/images">
        <div style="margin: 10px">
            Allowed extensions are: .pdf, .jpg, .jpeg, .png, .gif<br />
            <telerik:RadUpload ID="upload" runat="server" InputSize="100" OverwriteExistingFiles="True"
                TargetFolder="~/Uploads" AllowedFileExtensions=".pdf,.jpg,.jpeg,.png,.gif" Width="700px"
                ControlObjectsVisibility="RemoveButtons, AddButton" ReadOnlyFileInputs="True">
            </telerik:RadUpload>
            <asp:CustomValidator ID="CustomValidator1" runat="server" ClientValidationFunction="validateUpload"
                Display="Dynamic">
                <span style="FONT-SIZE: 11px;color:Red;">Invalid extensions.</span>
            </asp:CustomValidator>
            <asp:Label ID="lbDocumentsUploaded" runat="server" Font-Size="11px"></asp:Label>
            <br />
            <br />
            <asp:Button ID="btnUpload" runat="server" Text="Upload all files" OnClick="btnUpload_Click" />
        </div>
    </asp:Panel>
    <script type="text/javascript">
        function validateUpload(source, arguments) {
            arguments.IsValid = $find('<%= upload.ClientID %>').validateExtensions();
        }

        $(function () { $(".scrollable").scrollable(); });
    </script>
</asp:Content>
